# Uncomment the next line to define a global platform for your project

# ignore all warnings from all pods
inhibit_all_warnings!

install! 'cocoapods', :deterministic_uuids => false, :warn_for_multiple_pod_sources => false, :warn_for_unused_master_specs_repo => false

platform :ios, '10.0'

#disable some warnings
post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            #disable some warnings of Pods
            config.build_settings['CLANG_WARN_DOCUMENTATION_COMMENTS'] = 'NO'
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
        end
    end
end

# 基础公共组件
def commonPods()
    # 模块化体系架构库，可用于AppDelegate解耦，路由跳转等
    # A delightful library for app business modular architecture. https://github.com/youzan/Bifrost
    pod 'Bifrost'
    
    # 组件化基类-引用本地依赖 HKLibBase
    pod 'HKLibBase', :path => './HKLibBase/HKLibBase.podspec'
    
    # 通用基础组件:基础宏定义，类别等
    pod 'HKLibCommon', :path => './HKLibCommon/HKLibCommon.podspec'
    
    # 网络库基础组件
    pod 'HKLibNetwork', :path => './HKLibNetwork/HKLibNetwork.podspec'
    
    # 调度组件
    pod 'HKMediator', :path => './HKMediator/HKMediator.podspec'
    
    # 键盘管理类
    pod 'HKLibKeyboard', :path => './HKLibKeyboard/HKLibKeyboard.podspec'
    
    # Sentry
    pod 'HKLibSentry', :path => './HKLibSentry/HKLibSentry.podspec'
    
    # 防止AppCrash类
    pod 'HKLibAvoidAppCrash', :path => './HKLibAvoidAppCrash/HKLibAvoidAppCrash.podspec'
    
    # 加载网络图片
    pod 'HKLibLoadPicture', :path => './HKLibLoadPicture/HKLibLoadPicture.podspec'
    
    # JSBridge
    pod 'HKLibJSBridge', :path => './HKLibJSBridge/HKLibJSBridge.podspec'
    
    # HKLibWebView
    pod 'HKLibWebView', :path => './HKLibWebView/HKLibWebView.podspec'
    
    # Flex布局框架
    pod 'HKLibFlexBox', :path => './HKLibFlexBox/HKLibFlexBox.podspec'
    
    # DatePicker日期选择器
    pod 'HKLibDatePicker', :path => './HKLibDatePicker/HKLibDatePicker.podspec'
    
    # AddressPicker配送区域选择器
    pod 'HKLibAddressPicker', :path => './HKLibAddressPicker/HKLibAddressPicker.podspec'
end

# 业务公共组件
def moduleCommonPods()
  # 存放公共模型类和跟业务相关的View
  pod 'HKModuleModels', :path => './HKModuleModels/HKModuleModels.podspec'
end

# 业务组件-UIKit
def uikitPods()
   pod 'HKModuleUIKit', :path => './HKModuleUIKit/HKModuleUIKit.podspec'
end

# 业务组件-Components
def componentsPods()
  pod 'HKModuleComponents', :path => './HKModuleComponents/HKModuleComponents.podspec'
end

# 业务组件-App
def appPods()
  uikitPods
  componentsPods
  pod 'HKModuleMain', :path => './HKModuleMain/HKModuleMain.podspec'
end

  # Comment the next line if you don't want to use dynamic frameworks
  #use_frameworks!
  #workspace文件名
  workspace 'HKiOSTools.xcworkspace'
  #主工程路径
  project 'HKiOSTools/HKiOSTools.xcodeproj'

target 'HKiOSTools' do
    project 'HKiOSTools/HKiOSTools.xcodeproj'
    commonPods
    moduleCommonPods
    appPods
end

target "HKLibBase_Example" do
    project 'HKLibBase/Example/HKLibBase.xcodeproj'
    commonPods
end

target "HKLibCommon_Example" do
    project 'HKLibCommon/Example/HKLibCommon.xcodeproj'
    commonPods
end

# 调取组件
target "HKMediator_Example" do
    project 'HKMediator/Example/HKMediator.xcodeproj'
    commonPods
end

# libNetwork
target "HKLibNetwork_Example" do
    project 'HKLibNetwork/Example/HKLibNetwork.xcodeproj'
    commonPods
end

# IQKeyBoardManager
target "HKLibKeyboard_Example" do
    project 'HKLibKeyboard/Example/HKLibKeyboard.xcodeproj'
    commonPods
end

# JJException
target "HKLibAvoidAppCrash_Example" do
    project 'HKLibAvoidAppCrash/Example/HKLibAvoidAppCrash.xcodeproj'
    commonPods
end

# HKLibLoadPicture
target "HKLibLoadPicture_Example" do
    project 'HKLibLoadPicture/Example/HKLibLoadPicture.xcodeproj'
    commonPods
end

# JSBridge
target "HKLibJSBridge_Example" do
    project 'HKLibJSBridge/Example/HKLibJSBridge.xcodeproj'
    commonPods
end

# WebView
target "HKLibWebView_Example" do
    project 'HKLibWebView/Example/HKLibWebView.xcodeproj'
    commonPods
end

# HKLibFlexBox
target "HKLibFlexBox_Example" do
    project 'HKLibFlexBox/Example/HKLibFlexBox.xcodeproj'
    commonPods
end

# HKLibDatePicker
target "HKLibDatePicker_Example" do
    project 'HKLibDatePicker/Example/HKLibDatePicker.xcodeproj'
    commonPods
end

# HKLibAddressPicker
target "HKLibAddressPicker_Example" do
    project 'HKLibAddressPicker/Example/HKLibAddressPicker.xcodeproj'
    commonPods
end

# Sentry
target "HKLibSentry_Example" do
    project 'HKLibSentry/Example/HKLibSentry.xcodeproj'
    commonPods
end

# model实体类
target "HKModuleModels_Example" do
    project 'HKModuleModels/Example/HKModuleModels.xcodeproj'
    commonPods
end

# UIKit工程入口
target "HKModuleUIKit_Example" do
    project 'HKModuleUIKit/Example/HKModuleUIKit.xcodeproj'
    commonPods
    moduleCommonPods
    uikitPods
end

# HKModuleComponents工程入口
target "HKModuleComponents_Example" do
    project 'HKModuleComponents/Example/HKModuleComponents.xcodeproj'
    commonPods
    moduleCommonPods
    componentsPods
end

# 主工程入口
target "HKModuleMain_Example" do
    project 'HKModuleMain/Example/HKModuleMain.xcodeproj'
    commonPods
    moduleCommonPods
    appPods
end

